/**
 * Generate time : 2010-11-26 13:51:40
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cd.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCD03
 * 
 */
public class ZMCDDirLimtOrg extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private Long fdLimitLevel = new Long(0); /* 查看权限级别 */
	private Long fdLimitLevel1 = new Long(0); /* 编辑权限级别 */
	private String fdOrgId = " "; /* 机构 */
	private String fdDirId = " "; /* 目录 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdLimitLevel");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("权限级别");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdLimitLevel1");
		eiColumn.setType("C");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("编辑权限级别");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdOrgId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("机构");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDirId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("目录");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCDDirLimtOrg() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdLimitLevel - 权限级别
	 * 
	 * @return the fdLimitLevel
	 */
	public Long getFdLimitLevel() {
		return this.fdLimitLevel;
	}

	/**
	 * set the fdLimitLevel - 权限级别
	 */
	public void setFdLimitLevel(Long fdLimitLevel) {
		this.fdLimitLevel = fdLimitLevel;
	}
	
	/**
	 * get the fdLimitLevel - 编辑权限级别
	 * 
	 * @return the fdLimitLevel
	 */
	public Long getFdLimitLevel1() {
		return this.fdLimitLevel1;
	}

	/**
	 * set the fdLimitLevel - 编辑权限级别
	 */
	public void setFdLimitLevel1(Long fdLimitLevel1) {
		this.fdLimitLevel1 = fdLimitLevel1;
	}

	/**
	 * get the fdOrgId - 机构
	 * 
	 * @return the fdOrgId
	 */
	public String getFdOrgId() {
		return this.fdOrgId;
	}

	/**
	 * set the fdOrgId - 机构
	 */
	public void setFdOrgId(String fdOrgId) {
		this.fdOrgId = fdOrgId;
	}

	/**
	 * get the fdDirId - 目录
	 * 
	 * @return the fdDirId
	 */
	public String getFdDirId() {
		return this.fdDirId;
	}

	/**
	 * set the fdDirId - 目录
	 */
	public void setFdDirId(String fdDirId) {
		this.fdDirId = fdDirId;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdLimitLevel(NumberUtils.toLong(StringUtils.toString(map.get("fdLimitLevel")), fdLimitLevel));
		setFdLimitLevel1(NumberUtils.toLong(StringUtils.toString(map.get("fdLimitLevel1")), fdLimitLevel1));
		setFdOrgId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdOrgId")), fdOrgId));
		setFdDirId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDirId")), fdDirId));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdLimitLevel", StringUtils.toString(fdLimitLevel, eiMetadata.getMeta("fdLimitLevel")));
		map.put("fdLimitLevel1", StringUtils.toString(fdLimitLevel1, eiMetadata.getMeta("fdLimitLevel1")));
		map.put("fdOrgId", StringUtils.toString(fdOrgId, eiMetadata.getMeta("fdOrgId")));
		map.put("fdDirId", StringUtils.toString(fdDirId, eiMetadata.getMeta("fdDirId")));

		return map;

	}
}